/**********************************
 *工具条事件
**********************************/

/**
* 增加部室参数
* @return
*/
function addBS(){
    var new_window = null;
     var newwin="/OrgUI/OrgUI_Addparam.jsp";
   new_window = window.open(newwin,'pass','width=450,height=200,resizable=1');
}

/**
* 删除部室参数
* @return
*/
function delBS(){
  var ls_t = BSForm.all("myTable")
  var paramName = document.BSForm.paramName;
  var submitflag;
  var paramNameVal="";
  var rowcount = paramName.length
  if(rowcount==undefined){
     if (paramName.checked){
        if (paramName.value == "new"){
          ls_t.deleteRow(2);
        }
        else {
          submitflag="y";
          paramNameVal = paramName.value + "$#$"+document.BSForm.orgCode.value+"$#$";
        }
      }
  }
  else{
    for (i=0;i<rowcount;i++){
      if (paramName[i].checked){
        if (paramName[i].value == "new"){
          ls_t.deleteRow(i+2);
          i = i - 1
          rowcount = rowcount - 1
        }
        else {
          submitflag="y";
          paramNameVal = paramNameVal + paramName[i].value + "$#$"+document.BSForm.orgCode[i].value+"$#$";
        }
      }
    }
  }
  if(submitflag == "y"){
    document.BSForm.paramNameVal.value=paramNameVal;
    document.BSForm.action=delAction;
    document.BSForm.submit();
  }
}
